//路由模块列表文件

const express = require('express');

const admin = express.Router();

//渲染登陆页面
admin.get('/login', require('./admin/loginPage'));

//实现登录功能
admin.post('/login', require('./admin/login'));

//渲染用户列表页
admin.get('/user', require('./admin/userPage'));

//实现退出功能
admin.get('/logout', require('./admin/logout'));

//渲染用户添加页
admin.get('/user-edit', require('./admin/user-edit'));

//实现用户添加功能
admin.post('/user-edit', require('./admin/user-edit-fn'));

//实现用户信息修改功能
admin.post('/user-modify', require('./admin/user-modify'));

//实现用户删除功能
admin.get('/user-delete', require('./admin/user-delete'));

//渲染文章列表页面
admin.get('/article', require('./admin/article'));

//渲染文章编辑页面
admin.get('/article-edit', require('./admin/article-edit'));

//实现文章添加功能
admin.post('/article-add', require('./admin/article-add'));

//实现文章修改功能
admin.post('/article-modify', require('./admin/article-modify'));

//实现文章删除功能
admin.get('/article-delete', require('./admin/article-delete'));

module.exports = admin;